//继承模板
{extend name="public/base"}


//CSS
{block name="style"}
<link rel="stylesheet" href="__ADMIN_STATIC__/lib/zTree/v3/css/zTreeStyle/zTreeStyle.css" type="text/css">
{/block}


{block name="breadcrumb" title="当前位置"}{/block}

//正文区域
{block name="body"}{//---------------------------------------------------------------------------}
<div class="page-container">
    <form action="/admin/config/save.html" method="post" class="form form-horizontal" id="form1">
        <div id="tab-category" class="HuiTab">
            <div class="tabBar cl">
                <span class="current">
                    基本资料
                </span>
                <span >
                    部门岗位
                </span>
                <span >
                    权限信息
                </span>

            </div>
            <div class="tabCon" id="基本资料">


        <fieldset><legend>基本资料</legend>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>姓名：</label>
            <div class="formControls col-xs-8 col-sm-3">
                <input type="text" class="input-text" value="{$info.title|default=''}" placeholder="标题" name="title" data-rule-required="true" />
            </div>
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>在职状态</label>
            <div class="formControls col-xs-8 col-sm-3">
                <input type="text" class="input-text" value="{$info.title|default=''}" placeholder="标题" name="title" data-rule-required="true" />
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>性别：</label>
            <div class="formControls col-xs-8 col-sm-3 skin-minimal">
                <div class="radio-box">
                    <label for="sex-1"><input type="radio" name="sex">男</label>
                </div>
                <div class="radio-box">
                    <label for="sex-1"><input type="radio" name="sex">女</label>
                </div>
            </div>
            <label class="form-label col-xs-4 col-sm-2">出生日期：</label>
            <div class="formControls col-xs-8 col-sm-3">
                <input type="text" class="input-text" value="{$info.title|default=''}" placeholder="标题" name="title" data-rule-required="true" />
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">手机号：</label>
            <div class="formControls col-xs-8 col-sm-3">
                <input type="text" class="input-text" value="{$info.title|default=''}" placeholder="标题" name="title" data-rule-required="true" />
            </div>
            <label class="form-label col-xs-4 col-sm-2">办公电话：</label>
            <div class="formControls col-xs-8 col-sm-3">
                <input type="text" class="input-text" value="{$info.title|default=''}" placeholder="标题" name="title" data-rule-required="true" />
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">QQ：</label>
            <div class="formControls col-xs-8 col-sm-3">
                <input type="text" class="input-text" value="{$info.title|default=''}" placeholder="标题" name="title" data-rule-required="true" />
            </div>
            <label class="form-label col-xs-4 col-sm-2">Email：</label>
            <div class="formControls col-xs-8 col-sm-3">
                <input type="text" class="input-text" value="{$info.title|default=''}" placeholder="标题" name="title" data-rule-required="true" />
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">身份证号：</label>
            <div class="formControls col-xs-8 col-sm-8">
                <input type="text" class="input-text" value="{$info.title|default=''}" placeholder="标题" name="title" data-rule-required="true" />
            </div>

        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">现在住址：</label>
            <div class="formControls col-xs-8 col-sm-8">
                <textarea name="" cols="" rows="" class="textarea"  placeholder="现在住址..."></textarea>
            </div>
        </div> 
        </fieldset>

        <fieldset><legend>登陆信息</legend>
        <div class="row cl">
            <label class="form-label col-sm-2">登录账号：</label>
            <div class="formControls col-sm-3">
                <input type="text" class="input-text" value="{$info.title|default=''}" readonly />
            </div>
            <label class="form-label col-sm-2">修改密码：</label>
            <div class="formControls col-sm-3">
                <input type="text" class="input-text" value="{$info.title|default=''}" placeholder="标题" name="title" data-rule-required="true" />
            </div>
            <div class="formControls col-sm-2 skin-minimal">
                <div class="check-box ">
                        <label><input type="checkbox" class="" value="" name="title" />确认修改</label>
                </div>
            </div>

        </div>
        </fieldset> 


        <div class="row cl">
            <div class="col-9 col-offset-2 ">
                <button class="btn btn-primary radius " type="button" >&nbsp;<i class="icon Hui-iconfont">&#xe6e1;</i> 保存&nbsp;&nbsp;</button>&nbsp;
                <button class="btn btn-primary radius " type="button" >&nbsp;<i class="icon Hui-iconfont">&#xe6e1;</i> 应用&nbsp;&nbsp;</button>&nbsp;
                <button class="btn btn-danger  radius " type="button" >&nbsp;<i class="icon Hui-iconfont">&#xe706;</i> 关闭&nbsp;&nbsp;</button>&nbsp;
            </div>
        </div>
            </div>
----------------------------------------------------------------------------------------
            <div class="tabCon"  id="部门岗位">
        <fieldset><legend>部门岗位</legend>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>部门：</label>
            <div class="formControls col-xs-8 col-sm-3">
                <input type="text" class="input-text" value="{$info.title|default=''}" placeholder="标题" name="title" data-rule-required="true" />
            </div>
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>岗位：</label>
            <div class="formControls col-xs-8 col-sm-3">
                <input type="text" class="input-text" value="{$info.title|default=''}" placeholder="标题" name="title" data-rule-required="true" />
            </div>
            <div class="formControls col-xs-8 col-sm-2">
                <button class="btn btn-primary radius " type="button" >&nbsp;<i class="icon Hui-iconfont">&#xe600;</i> 添加&nbsp;&nbsp;</button>
            </div>
        </div>

        </fieldset>
<br/>
    <form class="Huiform" method="get" action="" id="listForm">
    <table class="table table-border table-bordered table-bg table-tr-hover">
        <thead>
            <tr class="text-c">
                <th width="25">
                    <input type="checkbox" name="" value="">
                </th>
                <th >部门</th>
                <th >职位</th>

                <th width="100">操作</th>
            </tr>
        </thead>
        <tbody>
            <tr class="text-c">
                <td><input type="checkbox" value="100" name="id[]"></td>
                <td>员工管理管理</td>
                <td>有效</td>


                <td>



                <button onClick="list_del(this,100)" type="button" class="btn btn-danger size-MINI radius" title="删除">
                    <i class="Hui-iconfont">&#xe6e2;</i> 删除
                </button>


                </td>
            </tr>
        </tbody>
    </table>
    </form>

            </div>
----------------------------------------------------------------------------------
            <div class="tabCon"  id="用户权限">
                用户权限 待开发...
            </div>
        </div>
        
    </form>
</div>




{/block}
//-----------------------------------------------------------------------------------------------


<!--请在下方写此页面业务相关的脚本-->
//-----------------------------------------------------------------------------------------------
{block name="script"}

<script type="text/javascript">




$(function(){
    //
    $("#tab-category").Huitab({
     index:0
    });

    //返回顶部
    $.Huitotop();

    //表单验证 提交
    $('#form1').validate({
        onkeyup:false, //在 keyup 时验证。
        onclick:false, // 在点击复选框和单选按钮时验证。
        onfocusout:false, //失去焦点时验证（不包括复选框/单选按钮）。
        onsubmit:true ,   // 提交时验证。设置为 false 就用其他方法去验证。
        focusCleanup:true,focusInvalid:false,
        success:"valid", //验证成功 添加样式
        rules: {

        },
        submitHandler:function(form){
            jBox.tip('loading...' , 'loading') ; 

            var $form  = $("form");
            var url = $form.attr('action');
            var type = $form.attr('method') || 'post';
            var data = $form.serialize();
            $.ajax({
                url: url ,
                type:type , // get post
                data: data , 
                dataType : 'html' ,
                success:function(d){
                    try{d = JSON.parse(d);}catch(err){jBox.alert( d , '查看ajax返回值');return false;}
                    if( 1 == d.code){
                        jBox.tip( d.msg , 'success');
                        setTimeout(function(){layer_close(1);},1000);
                    }else{
                        jBox.tip( d.msg , 'error');
                    }
                },
                error:function(XMLHttpRequest, textStatus, errorThrown){
                    console.log( 'ajaxError : ' + textStatus );
                },
                complete:function(){
                    setTimeout(function(){jBox.closeTip();},3000);
                }
            });

        },
        showErrors:function(errorMap,errorList) {
            this.defaultShowErrors(); //默认验证 
            if( this.numberOfInvalids() ){
                jBox.tip( '有' + this.numberOfInvalids() + '个错误，请检查！' ,'error');
            }
        }
    });

    //


    
});

//--------------------------------------------




</script>

<style>
    

    
</style>



{/block}{//---------------------------------------------------------------------------}